#http://docs.djangoproject.com/en/1.2/howto/static-files/#howto-static-files

from django.conf.urls.defaults import *
from django.conf import settings

# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()
medi='%s/site-media/files/'%settings.BASE_DIR
urlpatterns = patterns('',
    # Example:
    #(r'^deptSite/', include('deptSite.foo.urls')),

    # Uncomment the admin/doc line below and add 'django.contrib.admindocs' 
    # to INSTALLED_APPS to enable admin documentation:
    # (r'^admin/doc/', include('django.contrib.admindocs.urls')),

    # Uncomment the next line to enable the admin:
    (r'^admin/', include(admin.site.urls)),
    (r'^contacts/$','deptSite.hrweb.views.contacts'),
    (r'^files/(?P<path>.*)$', 'django.views.static.serve', {'document_root': medi,'show_indexes': True}),
    (r'^$', 'deptSite.hrweb.views.index'),
    (r'^(?P<unit_slug>[\w-]+)/$', 'deptSite.hrweb.views.unit_index'),
    (r'^(?P<unit_slug>[\w-]+)/pages/$', 'deptSite.hrweb.views.unit_page_list'),
    (r'^(?P<unit_slug>[\w-]+)/(?P<page_slug>[\w-]+)/$', 'deptSite.hrweb.views.unit_sub_page'), 
    #(r'^(?P<unit_id>\d+)/(?P<page_id>\d+)/$', 'deptSite.hrweb.views.unit_page'),
    
)
